<%@ page language="java" contentType="text/html; charset=UTF-8"  isELIgnored="false"  pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>  
<script src="<%=request.getContextPath() %>/static/js/jquery.min.js" type="text/javascript"></script>
<style>
	table{
		width: 600px;

	}
	tr{
		height: 40px;

	}
	td {
		width: 80px;
		border-bottom:1px dashed lightgrey;
	}

	.submitBtn{
		display: block;
		border: none;
		background-color: dodgerblue;
		color: white;
		width: 250px;
		height: 30px;
		line-height: 30px;
		text-decoration: none;
		text-align: center;
		margin-top: 10px;

	}
</style>
<html>

    <head>
        
    </head>
    
    <body>
        
    <form id="payForm" action="<%=request.getContextPath() %>/alipay/goAlipay.action" method="post">
    	<input type="hidden" name="orderId" value="${order.id }" />
        <table>
        	<tr>
        		<td>
        			<%--订单编号: ${order.orderId}--%>
						订单编号: 1222
        		</td>
        	</tr>
			<tr>
        		<td>
        			<%--产品名称: ${product.productName }--%>
						产品名称: 咸鱼
        		</td>
			</tr>
        	<tr>

        		<td>
        			<%--订单价格: ${order.orderAmount }--%>
						订单价格: 500
        		</td>

        	</tr>

        	<tr>
        		<td>
        			<input class="submitBtn" type="submit" value="前往支付宝进行支付">

        		</td>
        	</tr>
        </table>
    </form>
    
    	
        <input type="hidden" id="hdnContextPath" name="hdnContextPath" value="<%=request.getContextPath() %>"/>
    </body>
    
</html>
<script>
	$(".submit").click(function () {

		var orderId = $(".orderId").val();
		location.href = "/order/goAlipay/"+ orderId;
	});
</script>

<script type="text/javascript">

// 	$(document).ready(function() {
		
// 		var hdnContextPath = $("#hdnContextPath").val();
		
// 	});
	

</script>

